<h2>&lt;? Online-PHP::<span class='orange'>Tutorials</span> ?&gt;</h2>
<div class="right_panel_ad"><? load_view('right_ad'); ?></div>
<? if ($items === NULL) { ?>
    <h3 class="back_button"><a href="<?=_HTTP_ROOT?>/tutorials/">&laquo; Back</a></h3>
<? } ?>

<ul class="tutorials">

    <?
    /*
     * Fields: title, intro, content, date_created
     */
    ?>
    <? if ($items !== NULL) foreach ($items as $item) { ?>
        <li class="intro">
            <div class="meta_data">Created: <?=date("d M y", $item['date_created'])?></div>
            <h3><a href="<?=_HTTP_ROOT?>/tutorials/<?=urlencode($item['title'])?>/"><?=$item['title']?></a></h3>
            <p><?=$item['intro']?> <a href="<?=_HTTP_ROOT?>/tutorials/<?=urlencode($item['title'])?>/">Read more</a></p>
        </li>
    <? } else { ?>
        <li>
            <div class="meta_data">Created: <?=date("d M y", $item['date_created'])?></div>
            <h3><?=$item['title']?></h3>
            <p class="tutorials_content"><?=$item['content']?></p>
        </li>        
    <? } ?>
    
</ul>